<!DOCTYPE html>
<html>
<head>
    <title>留言管理</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.2/style/weui.min.css ">
    <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.0/css/jquery-weui.min.css ">
    <link rel="stylesheet" href="https://jqweui.cn/dist/demos/css/demos.css ">
    <link rel="stylesheet" href="https://at.alicdn.com/t/font_587767_rj4fkdnklqttvs4i.css ">
    <script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js "></script>
    <link rel="stylesheet" type="text/css" href="__TMPL__/public/assets/css/mui.min.css">
    <script src="__TMPL__/public/assets/js/mui.min.js"></script>
    <link rel="stylesheet" href="//at.alicdn.com/t/font_547740_4a09idamj7yl23xr.css">

</head>
<body style="background: #eeefef">
<!--头部开始-->
<div class="weui-flex" style="border-bottom: 1px solid gainsboro;background: #FCFCFC;height: 45px">
    <div class="weui-flex__item" style="margin-top: 15px;">
        <div class="placeholder" style="margin-left: 10px;margin-top: -5px;">
            <a href="{:url('/portal/teacher/teacher','teacher_id=8')}"><span  style="color: #04BE02;" onclick="history.back()" class="icon  icon-back"></span>
            </a></div>
    </div>

    <div class="weui-flex__item">
        <div class="placeholder" style="text-align: center;margin-top: 10px; color: #404040;">留言管理</div>
    </div>

    <div class="weui-flex__item">
        <div class="placeholder"></div>
    </div>
    <!--<a   href="{:url('/portal/teacher/subscribe_accept','teacher_id=8')}"   style="margin-top: 10px;margin-right: 12px;color: #04BE02;font-size: 12px" >查看已接受</a>-->
</div>
<!--头部结束-->
<ul class="mui-table-view" style="margin-top: 8px">
    <volist name="res" id="vo1">
        <li id="{$vo1['id']}" class="mui-table-view-cell" style="padding: 0px">
            <div class="mui-row">
                <div class="mui-col-sm-12 mui-col-xs-12" style=";border-bottom: 1px #eeefef solid;">
                    <a href="{:url('portal/teacher/liuyan_content',array('id'=>$vo1['id']))}" style="color: darkslategrey">
                        <div class="mui-row"  style="padding: 11px 15px;background-color: #f7f8f8">
                            <div class="mui-col-sm-3 mui-col-xs-3">
                                <img src="__TMPL__/public/assets/images/demo/techer1.jpg" style="width: 71%;height: 71%;">
                            </div>
                            <div class="mui-col-sm-9 mui-col-xs-9">
                                <div class="mui-col-sm-12 mui-col-xs-12" style="color: black;font-size: 12px;line-height: 20px">
                                    <if condition="$vo1.static eq 1">
                                        <span style="float: left; color: #23cd77;"></span>
                                        <elseif condition="$vo1.static eq 0"/>
                                        <span style="float: left; color: #23cd77;" class="icon bb icon-yuandianxiao"></span>
                                    </if> 用户名
                                    <span style="float: right; ">{$vo1.comit_time}</span>

                                </div>
                                <div class="mui-col-sm-7 mui-col-xs-7" style="color: darkgrey;font-size: 12px;line-height: 20px">
                                    {$vo1.content}
                                </div>
                            </div>
                        </div>
                    </a>
                    <div class="mui-col-sm-12 mui-col-xs-12"  style="margin-top: -40px;">
                        <span  style="float: right;margin-right: 8px"><a style="border: none"  href="javascript:;" onclick="del({$vo1['id']})" class="weui-btn weui-btn_mini weui-btn_default">删除</a></span>
                    </div>
                </div>

            </div>
        </li>
    </volist>

</ul>
<script src="__TMPL__/public/assets/js/jquery-2.1.4.js"></script>
<script src="__TMPL__/public/assets/js/fastclick.js"></script>
<script>
    $(function() {
        FastClick.attach(document.body);
    });
</script>
<script src="__TMPL__/public/assets/js/jquery-weui.js"></script>
<script src="__TMPL__/public/assets/js/city-picker.js"></script>
<script>

    $(".delete6").click(function () {
        window.location.href = "{:url('Teacher/')}";
    });
    function del(id){
        $.ajax({
            type:"post",
            url:"{:url('/portal/Teacher/liuyan_del')}",
            dataType:'JSON',
            data:{del_id:id},
            error: function (data){
                mui.toast('删除失败');
            },
            success: function (data) {
                mui.toast('成功删除');
                document.getElementById(id).remove();
            }
        });
    }
    function accept(id){
        $.ajax({
            type:"post",
            url:"{:url('/portal/Teacher/liuyan_del')}",
            dataType:'JSON',
            data:{accept_id:id},
            error: function (data){
                mui.toast('标记失败');
            },
            success: function (data) {
                mui.toast('成功标记');
                document.getElementById(id).remove();
            }
        });
    }
</script>

</body>
</html>